<%= tr8n_lightbox_header_tag %>
<div class="inner">
    <div class="hd">
        <%= tr8n_lightbox_title_tag(tra("Adding To Component")) %>
    </div>
    <div class="bd" style="padding-bottom:80px;">
        <%= form_for(@comp, :as => :comp, :url => {:action => :lb_add_to_component}, :html => {:id => 'tr8n_form', :method => :post, :class => "tr8n"}) do |form| %>
        <%= hidden_field_tag(:origin, params[:origin]) %>
        <%= hidden_field_tag :sources, params[:sources] %>
        <%= hidden_field_tag :translators, params[:translators] %>
        <%= hidden_field_tag :languages, params[:languages] %>
        <div style="margin-bottom:5px;padding:5px;">
          Select an existing component: <%=select_tag(:comp_id, options_for_select(@components)) %>
        </div>
        <div style="padding:5px;">
          <div style="padding-bottom:10px;">or create a new one:</div>
            <table class="admin_table">
                <tr>
                    <th>
                        Application:
                    </th>
                    <td>
                        <%= select_tag "comp[application_id]", options_for_select(@apps, @comp ? @comp.application_id : nil), :style=>"width:99%;" %>
                    </td>
                </tr>
                <tr>
                    <th>
                        Key: (required)
                    </th>
                    <td>
                        <%= form.text_field :key, :style=>"width:99%;" %>
                    </td>
                </tr>
                <tr>
                    <th>
                        Name:
                    </th>
                    <td>
                        <%= form.text_field :name, :style=>"width:99%;" %>
                    </td>
                </tr>
                <tr>
                    <th>
                       Description:
                    </th>
                    <td>
                        <%= form.text_area :description, :style=>"width:99%;height:50px;" %>
                    </td>
                </tr>
                <tr>
                    <th>
                        State:
                    </th>
                    <td>
                        <%= select_tag("comp[state]", options_for_select(Tr8n::Component.state_options, @comp ? @comp.state : nil), :style=>"width:99%;") %>
                    </td>
                </tr>
            </table>
        </div>
        <% end %>
    </div>
    <div class="ft">
        <%= tr8n_lightbox_buttons_tag %>
    </div>
</div>
<%= tr8n_lightbox_footer_tag %>
